<template>
  <div id="app">
    <ul>
      <router-link to="/toParent" tag="li" activeClass="act">子传父</router-link>
      <router-link to="/toChild" tag="li" activeClass="act">父传子</router-link>
      <router-link to="/Slot" tag="li" activeClass="act">插槽</router-link>
      <router-link to="/echarts" tag="li" activeClass="act">Echarts</router-link>
    </ul>
    <router-view></router-view>

    <!--<child ></child>-->

  </div>
</template>

<script>
  import ToParent from '@/components/toParent'
  export default {
    name: 'app',
    component: {
      ToParent,
    }
  }
</script>

<style lang="scss" scoped>
  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
  }

  ul {
    display: flex;
    list-style: none;
    li {
      height: 50px;
      line-height: 50px;
      padding: 0 20px;
      font-size: 25px;
      font-weight: bold;
    }
  }
  .act{
    background-color: #f1f1f1;
    color: #D2A8A1;
  }

</style>

